package com.yc.cloud.common.message.sms.dto.request;

import com.yc.cloud.common.basic.enums.EnumValue;
import com.yc.cloud.common.message.sms.enums.SmsTypeEnums;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;


/**
 * @title: SendSmsParam
 * @Author JackGu
 * @Date: 2022/10/14 13:31
 * @Version 1.0
 */
@Data
@ApiModel
public class SmsMobileCodeParam {

    @ApiModelProperty(value = "手机号", required = true)
    @NotEmpty(message = "手机号不能为空")
    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$", message = "电话号码格式不正确")
    private String mobile;

    @ApiModelProperty(value = "类型,register:注册,forgetpwd:忘记密码,login:登录", required = true)
    @NotEmpty(message = "类型不能为空")
    @EnumValue(enumClass = SmsTypeEnums.class, message = "类型不支持")
    private String type;

}
